<template>
  <el-config-provider :size="'default'" :locale="zhCn">
    <router-view v-slot="{ Component }">
      <transition name="router_animate">
        <component :is="Component" />
      </transition>
    </router-view>
  </el-config-provider>
</template>

<script lang="ts" setup>
import { ElConfigProvider } from 'element-plus'
import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
import en from 'element-plus/dist/locale/en.mjs'

/**
 * 设置主题色
 */
const a = ref()
onMounted(async () => {
  document.body.style.setProperty('--el-color-primary', '#2260FF')
  document.body.style.setProperty('--el-color-success', '#16BA3A')
  document.body.style.setProperty('--el-color-warning', '#f4511e')
  document.body.style.setProperty('--el-color-danger', '#f53f3f')
})
</script>

<style>
/* 在线图标 */
@import url('http://at.alicdn.com/t/c/font_4029595_nh2b4t89b8.css');

.router_animate-enter-active {
  animation: slideInLeft 0.3s;
}
.router_animate-leave-active {
  animation: slideOutLeft 0.3s;
}

#nprogress .bar {
  background: #2260ff !important;
}
</style>
